import { GameModule } from '@game/game.module';
import { Type } from '@nestjs/common';
import { WebSocketGatewayModule } from './web-socket/web-socket.module';
import { MJModule } from './web-socket/mj/mj.module';
import { AuthModule } from './auth/auth.module';
import { UserModule } from './user/user.module';

interface Route {
  path: string;
  jwt?: boolean;
  module?: Type<any> | string;
  childrens?: Routes | Type<any>[] | string[];
  children?: Routes | Type<any>[] | string[];
}
declare type Routes = Route[];
export const routes: Routes = [
  {
    path: '/api',
    module: GameModule,
    children: [
      {
        path: '/room',
        jwt:true,
        module: WebSocketGatewayModule,
      },
      {
        path: '/paiMsg',
        jwt:true,
        module: MJModule,
      },
      {
        path: '/auth',
        module: AuthModule,
      },
      {
        path: '/user',
        jwt:true,
        module: UserModule,
      },
    ],
  },
];
